
.calc-grid-col (@type, @n: @grid-columns, @i: 1) when (@type = width) and (@i <= @n){
    .grid-@{i}{
        width: (@i * 100% / @n);
        .float-left();
        .border-box();
    }
}

.loop-cols (@type, @n: @grid-columns, @i: 1) when (@i <= @n){
    .calc-grid-col(@type, @n, @i);
    .loop-cols(@type, @n, @i+1);
}

.make-cols() {
    .loop-cols(width);
}

.grid {
    margin: 0 auto;
    width: 100%;
    .clearfix();
}

.make-cols();